﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using DevKnightlie.WPF.AutoForm.FieldDefinitions;
using System.Windows.Controls;

namespace DevKnightlie.WPF.AutoForm.Tests
{
    /// <summary>
    /// Tests the output of the TextFieldDefinition class
    /// </summary>
    [TestClass]
    public class TextFieldDefinitionTests
    {

        /// <summary>
        /// Tests that the input control and field label control are correct
        /// </summary>
        [TestMethod]
        public void TestTextFieldDefinitionControls()
        {
            TextFieldDefinition fieldDefinition = new TextFieldDefinition()
            {
                PropertyName = "FirstName"
            };
            Control inputControl = fieldDefinition.InputControl;
            Control labelControl = fieldDefinition.LabelControl;
            Assert.IsTrue(inputControl is TextBox);
            Assert.IsTrue(labelControl is Label);
        }


        
    }
}
